package design.observer.example;

/**
 * @author chengzhang
 * 2021/9/30 15:46
 */
public class Client {

    public static void main(String[] args) {
        Subject sub = new ConcreteSubject();
        //添加观察者1
        sub.addObserver(new ConcreteObserver1());
        //添加观察者2
        sub.addObserver(new ConcreteObserver2());
        sub.doSomething();
    }

}
